From c26c68374458681aff122267af06d75e551bc474 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 15 Aug 2012 13:19:48 -0600 Subject: [PATCH] add test case for I/O switching --- test/automated/threads.el | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/automated/threads.el b/test/automated/threads.el index b09e269b0d7..4c1afbdde67 100644 --- a/test/automated/threads.el +++ b/test/automated/threads.el @@ -162,4 +162,17 @@ (thread-join thr)) t))) +(defun threads-test-io-switch () + (setq threads-test-global 23)) + +(ert-deftest threads-io-switch () + "test that accept-process-output causes thread switch" + (should + (progn + (setq threads-test-global nil) + (make-thread #'threads-test-io-switch) + (while (not threads-test-global) + (accept-process-output nil 1)) + threads-test-global))) + ;;; threads.el ends here -- 2.30.2